package com.lingyu.jsjx.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyu.jsjx.mapper.TeacherSelfEvaluationMapper;
import com.lingyu.jsjx.domain.TeacherSelfEvaluation;
import com.lingyu.jsjx.service.ITeacherSelfEvaluationService;

/**
 * 自我评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class TeacherSelfEvaluationServiceImpl  extends ServiceImpl<TeacherSelfEvaluationMapper, TeacherSelfEvaluation> implements ITeacherSelfEvaluationService
{
    @Autowired
    private TeacherSelfEvaluationMapper teacherSelfEvaluationMapper;

    /**
     * 查询自我评价
     * 
     * @param selfEvalId 自我评价主键
     * @return 自我评价
     */
    @Override
    public TeacherSelfEvaluation selectTeacherSelfEvaluationBySelfEvalId(Long selfEvalId)
    {
        return teacherSelfEvaluationMapper.selectTeacherSelfEvaluationBySelfEvalId(selfEvalId);
    }

    /**
     * 查询自我评价列表
     * 
     * @param teacherSelfEvaluation 自我评价
     * @return 自我评价
     */
    @Override
    public List<TeacherSelfEvaluation> selectTeacherSelfEvaluationList(TeacherSelfEvaluation teacherSelfEvaluation)
    {
        return teacherSelfEvaluationMapper.selectTeacherSelfEvaluationList(teacherSelfEvaluation);
    }

    /**
     * 新增自我评价
     * 
     * @param teacherSelfEvaluation 自我评价
     * @return 结果
     */
    @Override
    public int insertTeacherSelfEvaluation(TeacherSelfEvaluation teacherSelfEvaluation)
    {
        return baseMapper.insert(teacherSelfEvaluation);
    }

    /**
     * 修改自我评价
     * 
     * @param teacherSelfEvaluation 自我评价
     * @return 结果
     */
    @Override
    public int updateTeacherSelfEvaluation(TeacherSelfEvaluation teacherSelfEvaluation)
    {

        return baseMapper.updateById(teacherSelfEvaluation);
    }

    /**
     * 批量删除自我评价
     * 
     * @param selfEvalIds 需要删除的自我评价主键
     * @return 结果
     */
    @Override
    public int deleteTeacherSelfEvaluationBySelfEvalIds(Long[] selfEvalIds)
    {
        return teacherSelfEvaluationMapper.deleteTeacherSelfEvaluationBySelfEvalIds(selfEvalIds);
    }

    /**
     * 删除自我评价信息
     * 
     * @param selfEvalId 自我评价主键
     * @return 结果
     */
    @Override
    public int deleteTeacherSelfEvaluationBySelfEvalId(Long selfEvalId)
    {
        return baseMapper.deleteById(selfEvalId);
    }
}
